import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 98152
 * Date: 2024-10-28
 * Time: 19:58
 */
public class Test1 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String str = in.nextLine();
        int len = str.length();
        int end = 0;
        int max = 0;
        int tmp = 0;
        int i = 0;
        for (; i < len; i++) {
            char ch = str.charAt(i);
            if (ch >= '0' && ch <= '9') {
                tmp++;
                //end = i;
                continue;
            }
            if (max < tmp) {
                end = i;
                max = tmp;
            }
            tmp = 0;
        }
        if (max < tmp) {
            end = i;
            max = tmp;
            tmp = 0;
        }
        System.out.println(str.substring(end - max, end));
    }
}
